import time

from unittest_A.Base.Base import Base
from selenium.webdriver.common.by import By

class Page(Base):
    # 点击登录
    login_loc=(By.LINK_TEXT,'登录')
    def login(self):
        self.click(self.login_loc)

    # 输入账号密码
    name=(By.NAME,'username')
    def username(self):
        self.send_keys(self.name,'17800382574')
    pwd=(By.NAME,'password')
    def password(self):
        self.send_keys(self.pwd,'123456')
    # 点击登录按钮
    dl_loc=(By.XPATH,'//*[@id="theForm"]/div[5]/a')
    def dl(self):
        self.click(self.dl_loc)

    def luoji_01_login(self):
        self.open_url('http://10.59.9.12:7001/')
        self.login()
        self.username()
        self.password()
        time.sleep(10)
        self.dl()